#pragma once

#include "BaseWindow.h"
#include "Puma2C.h"
#include "Dialogs.h"
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glaux.h>

class MainWindow : public BaseWindow
{
private:
	GLint		viewport[4];
	GLdouble	modelview[16];
	GLdouble	projection[16];

	PumaPack pum, pum2;
	deque<Pos> deq;
	bool timeOn;
	int find, sind;
protected:
	Puma2C puma;
	Dialogs dialogi;

	void	reinitWndScreenData();
	void	StartTime();
	void	StopTime();
	void	DrawParametricSpace();
	void	DrawScene();
	void	GetColor(int d, float* color);
public:
	MainWindow(HINSTANCE hInastance);

	void	InitGL();
	void	Draw();
	void	SizeChanged();
	void	OnInit();
	void	OnCreate();
	void	OnDestroy();
	void	OnMenuChoosed(WPARAM wParam);
	void	OnLButtonDown(WPARAM wParam, LPARAM lParam);
	void	OnRButtonDown(WPARAM wParam, LPARAM lParam);
	void	OnRButtonUp(WPARAM wParam, LPARAM lParam);
	void	OnMouseMove(WPARAM wParam, LPARAM lParam);
	void	OnMouseWheel(WPARAM wParam, LPARAM lParam);
	void	OnKeyDown(WPARAM wParam);
	void	OnTimerMethod();
};